package com.cdutetc.ssm.service.impl;

import com.cdutetc.ssm.mapper.StudentMapper;
import com.cdutetc.ssm.pojo.Student;
import com.cdutetc.ssm.service.StudentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

@Service
@Transactional
public class StudentServiceImpl implements StudentService {
    @Autowired
    private StudentMapper studentMapper;

    @Override
    public List<Student> getAllStudent() {
        return studentMapper.getAllStudent();
    }

    @Override
    public void addStudent(Student student) {
        studentMapper.addStudent(student);
    }

    @Override
    public void deleteStudent(Integer studentId) {
        studentMapper.deleteStudent(studentId);
    }


}
